package UnitTest.DataStructureTest.stringANDlineTest.slidingWindowTest;

import DataStructure.stringANDline.slidingWindow.MinCoverSubstring1;
import TestData.DataStructureTestData.stringANDlineTestData.slidingWindowTestData.MinCoverSubstringTestData;
import org.junit.Test;

/**
 * @author liujun
 * @version 1.0
 * @date 2020/12/21
 * @author—Email liujunfirst@outlook.com
 * @blogURL https://blog.csdn.net/ljfirst
 * @description 单元测试： 最小覆盖子串
 * 1、要求 最小覆盖字串 中仅仅含有一个字符：[a-z]、[A-Z]
 * 2、要求 最小覆盖字串 中所以符号不能重复
 */

public class MinCoverSubstringTest1Test extends MinCoverSubstringTestData {

    MinCoverSubstring1 mc = new MinCoverSubstring1();

    @Test
    public void test() {
        int target = mc.findMinSubString(demo01);
        assert target == 2;
        target = mc.findMinSubString(demo02);
        assert target == 0;
        target = mc.findMinSubString(demo03);
        assert target == 3;
        target = mc.findMinSubString(demo04);
        assert target == 1;
        target = mc.findMinSubString(demo05);
        assert target == 5;
        target = mc.findMinSubString(demo06);
        assert target == 2;
        target = mc.findMinSubString(demo07);
        assert target == 11;
    }

}
